package it.polimi.traveldream.web.beans.employee;

import it.polimi.traveldream.ejbclient.eaos.AccountServiceEAO;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean(name="personalHomeEmployee")
@SessionScoped
public class PersonalHomeEmployeeBean {
	@EJB
	private AccountServiceEAO aService;
	private boolean baseProductOverpast;
	private boolean travelPackageOverpast;
	private int idPackage;
	
	public PersonalHomeEmployeeBean() {
		
	}
	
	public String getCurrentUserEmail() {
		return aService.getCurrentUser().getEmail();
	}
	
	public String getCurrentUserName() {
		return aService.getCurrentUser().getName();
	}
	
	public String getCurrentUserSurname() {
		return aService.getCurrentUser().getSurname();
	}
	
	public boolean isBaseProductOverpast() {
		return baseProductOverpast;
	}

	public void setBaseProductOverpast(boolean baseProductOverpast) {
		this.baseProductOverpast = baseProductOverpast;
	}
	
	public boolean isTravelPackageOverpast() {
		return travelPackageOverpast;
	}

	public int getIdPackage() {
		return idPackage;
	}

	public void setIdPackage(int idPackage) {
		this.idPackage = idPackage;
	}

	public void setTravelPackageOverpast(boolean travelPackageOverpast) {
		this.travelPackageOverpast = travelPackageOverpast;
	}
	
	public String navigateToBaseProducts() {
		return "listBaseProduct";
	}
	
	public String navigateToPackages() {
		return "listPackage";
	}
	
	public String navigateToParticipations() {
		return "listParticipation";
	}
	
}
